June 24, 2025
Tuesday
Discrete random variable: a variable that can assume only a finite or countably infinite number of distinct values.
Probability distribution of a random variable: collection of probabilities for each value of the random variable.
Notation:
Probability function for \boldsymbol Y: sum of the the probabilities of all sample points in S that are assigned the value y
Probability distribution for \boldsymbol Y: a formula, table, or graph that provides p(y) \ \forall \ y.
Theorem:
E(Y) = \sum_{y} y p(y)
E[Y] = \mu
Theorem:
E[g(Y)] = \sum_{y} g(y) p(y)
V[Y] = E\left[ (Y-\mu)^2 \right]
V[Y] = \sigma^2
Theorem:
E(c) = c
Theorem:
E[cg(Y)] = cE[g(Y)]
Theorem:
E[g_1(Y) + g_2(Y) + ... + g_k(Y)] = E[g_1(Y)] + E[g_2(Y)] + ... + E[g_k(Y)]
Putting the previous theorems into one:
Theorem:
V[Y] = \sigma^2 = E\left[(Y-\mu)^2\right] = E\left[Y^2\right] - \mu^2
Use the previous theorem to find V[Y] and compare to our previous answer.
Binomial experiment:
The experiment consists of a fixed number, n, of identical trials.
Each trial results in one of two outcomes: success (S) or failure (F).
The probability of success on a single trial is equal to some value p and remains the same from trial to trial.
The trials are independent.
The random variable of interest is Y, the number of successes observed during the n trials.
Binomial Distribution
p(y) = {n \choose y}p^y q^{n-y}, \text{ where } y = 0, 1, 2, ..., n, \text{ and } 0 \le p \le1
Theorem:
E[Y] = \mu = np \ \ \ \text{and} \ \ \ V[Y] = \sigma^2 = npq
p=0.10
p=0.25
p=0.50
p=0.75
p=0.90
The manufacturer of a low-calorie dairy drink wishes to compare the taste appeal of a new formula (formula B) with that of the standard formula (formula A). Each of four judges is given three glasses in random order, two containing formula A and the other containing formula B. Each judge is asked to state which glass he or she most enjoyed. Suppose that the two formulas are equally attractive. Let Y be the number of judges stating a preference for the new formula.
Find the probability function for Y.
What is the probability that at least three of the four judges state a preference for the new formula?
Find the expected value of Y.
Find the variance of Y.
The Poisson probability distribution often provides a good model for the probability distribution of the number Y of rare events that occur in space, time, volume, or any other dimension.
Poisson Distribution:
p(y) = \frac{\lambda^y}{y!}e^{-\lambda}, \text{ where } y=0,1,2,..., \text{ and } \lambda > 0
Theorem
E[Y] = \mu = \lambda \text{ and } V[Y] = \sigma^2 = \lambda
Customers arrive at a checkout counter in a department store according to a Poisson distribution at an average of seven per hour. During a given hour, what are the probabilities that
no more than three customers arrive?
at least two customers arrive?
exactly five customers arrive?
Distribution function:
F(y) = P[Y \le y] \text{ for } -\infty < y < \infty
Probability density function:
p[Y = y] = f(y) = \frac{dF(y)}{dy} = F'(y).
Cumulative density function:
P[Y \le y] = F(y) = \int_{-\infty}^y f(t) dt, \text{ for } y \in {\rm I\!R}.
Suppose that F(x) = \begin{cases} 0, & y < 0 \\ y, & 0 \leq y \leq 1 \\ 1, & y > 1 \end{cases}
Find the probability density function for Y.
Theorem
P[a \le Y \le b] = \int_a^b f(y) dy.
Given f(y) = cy^2, where 0 \le y \le 2 and f(y)=0 elsewhere,
Find the value of c for which f(y) is a valid density function.
Find P[1 \le Y \le 2].
Expected value:
E[Y] = \int_{-\infty}^{\infty} y f(y) \ dy
E[Y] = \sum_y y p(y)
Theorem:
E\left[ g(Y) \right] = \int_{-\infty}^{\infty} g(y) f(y) \ dy
In a previous example, we determined that f(y) = \frac{3}{8}y^2 for 0 \le y \le 2 and f(y) = 0 elsewhere is a valid density function.
If the random variable Y has this density function, find \mu = E[y] and \sigma^2 = V[Y]
Uniform Distribution
f(y) = \begin{cases} \frac{1}{\theta_2 - \theta_1}, & \theta_1 \le y \le \theta_2 \\ 0, & \text{elsewhere} \end{cases}
Theorem:
E[Y] = \mu = \frac{\theta_1+\theta_2}{2} \ \ \ \text{and} \ \ \ V[Y] = \sigma^2 = \frac{(\theta_2-\theta_1)^2}{12}
f(y) = \begin{cases} k, & -2 \le y \le 2 \\ 0, & \text{elsewhere} \end{cases}
Determine the value of k.
Find the distribution function for Y.
f(y) = \begin{cases} k, & -2 \le y \le 2 \\ 0, & \text{elsewhere} \end{cases}
What is the mean of the distribution?
What is the variance of the distribution?
Normal Distribution
f(y) = \frac{1}{\sigma \sqrt{2\pi}} e^{-(y-\mu)^2/(2\sigma^2)}
Theorem:
E[Y] = \mu = \ \ \ \text{and} \ \ \ V[Y] = \sigma^2
If $450 is budgeted for next week, what is the probability that the actual costs will exceed the budgeted amount?
How much should be budgeted for weekly repairs and maintenance to provide that the probability the budgeted amount will be exceeded in a given week is only 0.10?
Gamma Distribution
f(y) = \begin{cases} \frac{y^{\alpha-1} e^{-y/\beta}}{\beta^{\alpha} \Gamma(\alpha)}, & 0 \le y < \infty \\ 0, & \text{elsewhere} \end{cases}
Note that \Gamma(\alpha) = \int_{0}^{\infty} y^{\alpha-1} e^{-y} \ dy.
Theorem:
E[Y] = \mu = \alpha\beta \ \ \ \text{and} \ \ \ V[Y] = \sigma^2 = \alpha\beta^2
Annual incomes for heads of household in a section of a city have approximately a gamma distribution with \alpha=20 and \beta=1000.
What is f(y)?
What is the mean of Y?
What is the variance of Y?
What proportion of heads of households in this section of the city have incomes in excess of $30,000?
Beta Distribution
f(y) = \begin{cases} \frac{y^{\alpha-1}(1-y)^{\beta-1}}{B(\alpha,\beta)}, & 0 \le y \le 1 \\ 0, & \text{elsewhere} \end{cases}
Note that B(\alpha,\beta) = \int_0^1 y^{\alpha-1}(1-y)^{\beta-1} \ dy = \frac{\Gamma(\alpha) \Gamma(\beta)}{\Gamma(\alpha+\beta)}.
Theorem:
E[Y] = \mu = \frac{\alpha}{\alpha+\beta} \ \ \ \text{and} \ \ \ V[Y] = \sigma^2 = \frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}
f(y) = \begin{cases} 12y^2(1-y), & 0 \le y \le 1 \\ 0, & \text{elsewhere} \end{cases}
Use integration to determine the probability that a randomly selected batch cannot be sold because of excessive impurities.
Use R to find the answer to part (a).
f(y) = \begin{cases} 12y^2(1-y), & 0 \le y \le 1 \\ 0, & \text{elsewhere} \end{cases}
Find the mean of the percentage of impurities in a randomly selected batch of the chemical.
Find the variance of the percentage of impurities in a randomly selected batch of the chemical.
STA6349 - Applied Bayesian Analysis - Summer 2025